package zouran.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Component;
import java.time.LocalDateTime;
/**
 * @Author: zouran
 * @Description: 新闻类
 * @Date: Created in 2022 2022/12/4 16:23
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Component
public class News {
       @TableId(type = IdType.AUTO)
       private Integer id;
       private String newsTitle;
       private String newsAuthor;
       @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
       @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
       private LocalDateTime newsDate;
       private String newsSort;
       private String newsDesc;
       private String newsContent;
       private String newsImagesPath;
}
